<script>
	function validar_formulario(){
		var nombre_evento = $('#nombre_evento').val();
		var direccion = $('#direccion').val();
		var lugar = $('#lugar').val();
		var descripcion = $('#descripcion').val();
		
		if(nombre_evento==''){
			alert('Ingrese Nombre de Evento');
			return false;
		}else{
			if(direccion==''){
				alert('Ingrese Direccion del Evento');
				return false;
			}else{
				if(lugar==''){
					alert('Ingrese Lugar de Evento');
					return false;
				}else{
					if(descripcion==''){
						alert('Ingrese Descripcion de Evento');
						return false;
					}
				}
			}
		}
	}
</script>
<div style="border-bottom:#CCC 1px solid; font-size:16px; color:#113597; font-weight:bold; padding-bottom:5px; margin:10px 0px">Registrar Evento</div>
<form id="formconsulta" name="formconsulta" action="index.php?c=eventos&m=registrar_evento" method="post" onSubmit="return validar_formulario();" enctype="multipart/form-data">
	(*):Campos Obligatorios
	<input type='hidden' name='tipo_persona' id="tipo_persona" value='0' />
	<input type='hidden' name='modo' id="modo" value='admin' />
	<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:#CCCCCC 1px solid;background-repeat:repeat-x; background-image:url(<?php echo DIR_IMAGENES?>/fondotabla.gif)">
	  <tr>
	    <td width="18"></td>
	    <td height="8"></td>
	    <td></td>
	  </tr>
	  <tr>
	    <td>&nbsp;</td>
	    <td height="28">Tipo Evento:</td>
	    <td>
	    	<select id="tipo_evento" name="tipo_evento">
	    		<?php foreach ($tipos as $tipo):?>
	    			<option value="<?php echo $tipo->id_tipo_evento?>"><?php echo $tipo->nombre_evento?></option>
	    		<?php endforeach;?>
	    	</select> 	
	    </td>
	  </tr>
	  <tr>
	    <td>&nbsp;</td>
	    <td height="28">Nombre de Evento(*):</td>
	    <td><input type="text" name="nombre_evento" id="nombre_evento" class="text1" style="height:22px; width:95%" /></td>
	  </tr>
	  <tr>
	    <td>&nbsp;</td>
	    <td height="28">Direccion(*):</td>
	    <td><input type="text" name="direccion" id="direccion" class="text1" style="height:22px; width:95%" /></td>
	  </tr>
	  <tr>
	    <td>&nbsp;</td>
	    <td height="28">Lugar(*):</td>
	    <td><input type="text" name="lugar" id="lugar" class="text1" style="height:22px; width:95%" /></td>
	  </tr>   
	  
	  <tr>
	    <td>&nbsp;</td>
	    <td height="28">Telefono:</td>
	    <td><input type="text" name="telefono" id="telefono" class="text1" style="height:22px; width:95%" /></td>
	  </tr>
	  
	  <tr>
	    <td>&nbsp;</td>
	    <td height="28">Correo:</td>
	    <td><input type="text" name="txtcorreo" id="textfield6" class="text1" style="height:22px; width:95%" /></td>
	  </tr>
	  
	  <tr>
	    <td>&nbsp;</td>
	    <td height="28" valign="top">Descripcion(*):</td>
	    <td><textarea id="descripcion" name="descripcion" cols="75" rows="6"></textarea></td>
	  </tr>
	  <tr>
	    <td>&nbsp;</td>
	    <td height="28">Precio:</td>
	    <td><input type="text" name="precio" id="precio" class="text1" style="height:22px; width:95%" /></td>
	  </tr>
	  <tr>
	    <td>&nbsp;</td>
	    <td height="31">Expositor:</td>
	    <td><input type="text" name="expositor" id="expositor" class="text1" style="height:22px; width:95%" /></td>
	  </tr>
	  <tr>
	    <td>&nbsp;</td>
	    <td height="31">Portada:</td>
	    <td><input type="file" name="portada" id="portada" class="text1" style="height:22px; width:95%" /></td>
	  </tr>
	 
	  <tr>
	    <td>&nbsp;</td>
	    <td height="31">Banner:</td>
	    <td><input type="file" name="banner" id="banner" class="text1" style="height:22px; width:95%" /></td>
	  </tr>
	  <tr>
	    <td>&nbsp;</td>
	    <td height="31">Estado:</td>
	    <td>
	    	<select id="estado" name="estado">
	    		<option value="1">Activado</option>
	    		<option value="1">Desactivado</option>
	    	</select> 	
	    </td>
	  </tr>
	  <tr>
	    <td>&nbsp;</td>
	    <td height="31">&nbsp;</td>
	    <td><input type="image" src="<?php echo DIR_IMAGENES?>/registrarse.gif" width="119" height="23" style="padding:0px; border:0px" /></td>
	  </tr>
	  <tr>
	    <td>&nbsp;</td>
	    <td height="18">&nbsp;</td>
	    <td>&nbsp;</td>
	  </tr>
	  
	</table>
</form>
<script type="text/javascript">
	tinyMCE.init({
		// General options
		language : "es",
		mode : "textareas",
		theme : "advanced",
		plugins : "style,layer,advhr,iespell,inlinepopups,insertdatetime,preview,paste,directionality,fullscreen,noneditable,visualchars,xhtmlxtras,template,advlist",

		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : false,

		// Example content CSS (should be your site CSS)
		content_css : "css/content.css",

		// Drop lists for link/image/media/template dialogs
		
		// Style formats
		style_formats : [
			{title : 'Bold text', inline : 'b'},
			{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
			{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
			{title : 'Example 1', inline : 'span', classes : 'example1'},
			{title : 'Example 2', inline : 'span', classes : 'example2'},
			{title : 'Table styles'},
			{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
		],

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
</script>